]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
main: Allow loading file-based stylesheets again
authorJasper St. Pierre <jstpierre@mecheye.net>
Wed, 15 Oct 2014 05:25:30 +0000 (22:25 -0700)
committerJasper St. Pierre <jstpierre@mecheye.net>
Wed, 15 Oct 2014 05:25:30 +0000 (22:25 -0700)
The gnome-classic mode ships a stylesheet on disk, so make sure to load
that if if we can't find any file in the resource itself.

js/ui/main.js

index 149e25a054ab79f8ed96e304c242a720f26102a0..2fff9e6545680e24443447376bec69e56827218b 100644 (file)
@@ -227,11 +227,25 @@ function _initializeUI() {
     });
 }
 
+function _getDefaultStylesheet() {
+    let stylesheet;
+
+    stylesheet = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/' + sessionMode.stylesheetName);
+    if (stylesheet.query_exists(null))
+        return stylesheet;
+
+    stylesheet = Gio.File.new_for_path(global.datadir + '/theme/' + sessionMode.stylesheetName);
+    if (stylesheet.query_exists(null))
+        return stylesheet;
+
+    return null;
+}
+
 function _loadDefaultStylesheet() {
     if (!sessionMode.isPrimary)
         return;
 
-    let stylesheet = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/' + sessionMode.stylesheetName);
+    let stylesheet = _getDefaultStylesheet();
     if (_defaultCssStylesheet && _defaultCssStylesheet.equal(stylesheet))
         return;